<#assign parameters = tag.parameters/>
<#assign aDateTime = .now>
<#assign aDate = aDateTime?date>

<#assign year = aDateTime?string.yyyy>
<#if parameters.start == 0 >
    <#assign start = (year?number -5)>
<#else>
    <#assign start = parameters.start>
</#if>

<#if parameters.end == 0 >
    <#assign end = (year?number +5)>
<#else>
    <#assign end = parameters.end>
</#if>


<select name="${parameters.name?default(parameters.id)?html}"<#rt/>
<#if parameters.id??>
        id="${parameters.id?html}"<#rt/>
</#if>
<#include "/${parameters.theme}/css.ftl"/>
<#include "/${parameters.theme}/validator.ftl"/>
<#include "/${parameters.theme}/scripting-events.ftl"/><#rt/>
>
<#list start..end as i>
    <option value="${i}"<#rt/>
        <#if inputValue??>
            <#if i?string==inputValue>
            selected="selected"<#rt/>
            </#if>
        <#else>
            <#if aDate?string.yyyy==i?string>selected</#if><#rt/>
        </#if>
    >${i}年
    </option><#rt/>
</#list>
</select>